﻿<!DOCTYPE html>
<!--承包商违章次数统计-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        .el-dialog__body {
            height: 100% !important;
        }
    </style>
</head>

<body>
    
<div id="app" v-cloak>   
        <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
            style="margin-bottom: 15px;">

            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />承包商安全工时统计列表</strong></div>
                    <span>
                        <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3" @click="onSubmit">
                        </btn>
                        <btn-export-list url="xxxx" :forminline="this.formInline" linetype="4">
                        </btn-export-list>
                    </span>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{SafetyWorkingHours.StartTimeStart+mark.m}}
                                </template>
                                <!-- <el-date-picker v-model="formInline.model.DiscoveryTimeBegin" type="date" slot="suffix" -->
                                <el-date-picker v-model="formInline.model.StartTimeStart" type="date" slot="suffix"
                                    size="mini" placeholder="选择日期">
                                </el-date-picker>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{SafetyWorkingHours.StartTimeEnd+mark.m}}
                                </template>
                                <!-- <el-date-picker v-model="formInline.model.DiscoveryTimeBegin" type="date" slot="suffix" -->
                                <el-date-picker v-model="formInline.model.StartTimeEnd" type="date" slot="suffix"
                                    size="mini" placeholder="选择日期">
                                </el-date-picker>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>

            </el-row>
        </el-form>

        <el-table stripe ref="table" :data="ListItem.tableData" :height="ListItem.tableHeight" border
            @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%">
            <el-table-column type="selection" align="center" width="55">
            </el-table-column>
            <el-table-column type="index" :label="ContractorDirectory.SerialNumber" :index="indexMethod" width="50"
                show-overflow-tooltip="true"></el-table-column>

            <!-- <el-table-column prop="ContractorName" :label="SafetyWorkingHours.ContractorName" min-width="150"
                show-overflow-tooltip="true">
            </el-table-column>

            <el-table-column prop="StartTime" min-width="120" show-overflow-tooltip="true"
                :label="SafetyWorkingHours.StartTime">
            </el-table-column> -->
            <el-table-column prop="Name" :label="SafetyWorkingHours.Name">
            </el-table-column>


            <el-table-column prop="Time" min-width="120" show-overflow-tooltip="true" :label="SafetyWorkingHours.Time">
            </el-table-column>

            <!-- <el-table-column width="53" prop="update" :label="col.btnUpdate" fixed="right">
                <template slot-scope="scope">
                    <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id)>
                        <i class="el-icon-edit"></i>
                    </button>
                </template>
            </el-table-column> -->
        </el-table>
        <el-row type="flex" justify="end">
            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>
        </el-row>
        <el-dialog title="承包商违章次数统计" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%"
            height="80%" top="10vh" fullscreen="true">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: function () {
                return {

                    IsBlacklist: [],
                    ListItem: ListItem,
                    formInline: {
                        model: {
                            ContractorName: '',
                            ViolationDate: '',
                            ViolationInstructions: '',
                            Violators: '',
                            ViolationClause: '',
                            DiscoveringPeople: '',
                            ProcessingOpinion: '',
                            IsBlacklist: '',
                            Remarks: '',
                            ExamineState: '',
                            StartTimeStart: '',
                            EndTimeStart: '',
                        },
                        offset: 0,
                        limit: 10
                    }
                }
            },
            mounted: function () {
                //获取下拉菜单内容
                this.IsBlacklist = getDicData('50');
                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/SafetyWorkingHours/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "ContractorViolationAccountInput.html", id); },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/SafetyWorkingHours/GetList') },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },

            }
        });

    </script>
</body>

</html>